package GUI;

import beans.AEAV;
import database.DB_Access;
import javax.swing.JTextField;
import java.io.IOException;
import java.sql.SQLException;
import java.util.LinkedList;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Gregor
 */
public class TarifTabelle extends java.awt.Dialog {
    private DB_Access dba;
    private LinkedList<AEAV> list;
    
    /**
     * Creates new form TarifTabelle
     */
    public TarifTabelle(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setResizable(false);
        this.setLocationRelativeTo(null);
        start();
    }

  
    private void start(){
        try {
            dba = new DB_Access();
            list = dba.getAEAV();
            
            tfOhneAVAEABStufe0.setText(String.format("%.2f", list.get(0).getAEAVohneKind()));
            tf1KindStufe0.setText(String.format("%.2f", list.get(0).getAEAVkind1()));
            tf2KindStufe0.setText(String.format("%.2f", list.get(0).getAEAVkind2()));
            tf3KindStufe0.setText(String.format("%.2f", list.get(0).getAEAVkind3()));
            tf4KindStufe0.setText(String.format("%.2f", list.get(0).getAEAVkind4()));
            tf5KindStufe0.setText(String.format("%.2f", list.get(0).getAEAVkind5()));
            tfMehrAls5.setText(String.format("%.2f", list.get(0).getAEAVabstufung()));
            
            tfGrenzMinStufe1.setText(String.format("%.2f", list.get(1).getAeavsteuer().getSteuerUntergrenze()));
            tfGrenzMaxStufe1.setText(String.format("%.2f", list.get(1).getAeavsteuer().getSteuerObergrenze()));
            tfProzentsatzStufe1.setText(String.format("%.2f", list.get(1).getAeavsteuer().getSteuersatz()));
            tfohneAVAEABStufe1.setText(String.format("%.2f", list.get(1).getAEAVohneKind()));
            tf1KindStufe1.setText(String.format("%.2f", list.get(1).getAEAVkind1()));
            tf2KindStufe1.setText(String.format("%.2f", list.get(1).getAEAVkind2()));
            tf3KindStufe1.setText(String.format("%.2f", list.get(1).getAEAVkind3()));
            tf4KindStufe1.setText(String.format("%.2f", list.get(1).getAEAVkind4()));
            tf5KindStufe1.setText(String.format("%.2f", list.get(1).getAEAVkind5()));
            //mehr als 5 Kinder
            lbAendern1.setText(String.format("%.2f", list.get(1).getAEAVabstufung()));
            
            tfGrenzMinStufe2.setText(String.format("%.2f", list.get(2).getAeavsteuer().getSteuerUntergrenze()));
            tfGrenzMaxStufe2.setText(String.format("%.2f", list.get(2).getAeavsteuer().getSteuerObergrenze()));
            tfProzentsatzStufe2.setText(String.format("%.2f", list.get(2).getAeavsteuer().getSteuersatz()));
            tfohneAVAEABStufe2.setText(String.format("%.2f", list.get(2).getAEAVohneKind()));
            tf1KindStufe2.setText(String.format("%.2f", list.get(2).getAEAVkind1()));
            tf2KindStufe2.setText(String.format("%.2f", list.get(2).getAEAVkind2()));
            tf3KindStufe2.setText(String.format("%.2f", list.get(2).getAEAVkind3()));
            tf4KindStufe2.setText(String.format("%.2f", list.get(2).getAEAVkind4()));
            tf5KindStufe2.setText(String.format("%.2f", list.get(2).getAEAVkind5()));
            //mehr als 5 Kinder
            lbAendern2.setText(String.format("%.2f", list.get(2).getAEAVabstufung()));
            
            //tfGrenzMinStufe3.setText(String.format("%.2f", list.get(2).getAeavsteuer().getSteuerUntergrenze()));
            //tfGrenzMaxStufe3.setText(String.format("%.2f", list.get(2).getAeavsteuer().getSteuerObergrenze()));
            tfProzentsatzStufe3.setText(String.format("%.2f", list.get(3).getAeavsteuer().getSteuersatz()));
            tfohneAVAEABStufe3.setText(String.format("%.2f", list.get(3).getAEAVohneKind()));
            tf1KindStufe3.setText(String.format("%.2f", list.get(3).getAEAVkind1()));
            tf2KindStufe3.setText(String.format("%.2f", list.get(3).getAEAVkind2()));
            tf3KindStufe3.setText(String.format("%.2f", list.get(3).getAEAVkind3()));
            tf4KindStufe3.setText(String.format("%.2f", list.get(3).getAEAVkind4()));
            tf5KindStufe3.setText(String.format("%.2f", list.get(3).getAEAVkind5()));
            //mehr als 5 Kinder
            lbAendern3.setText(String.format("%.2f", list.get(3).getAEAVabstufung()));
        } catch (IOException ex) {
            Logger.getLogger(TarifTabelle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(TarifTabelle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(TarifTabelle.class.getName()).log(Level.SEVERE, null, ex);
        } catch (Exception ex) {
            Logger.getLogger(TarifTabelle.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        JPAAANEL = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jPanel3 = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel17 = new javax.swing.JLabel();
        jLabel18 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jPanel8 = new javax.swing.JPanel();
        jLabel21 = new javax.swing.JLabel();
        tfOhneAVAEABStufe0 = new javax.swing.JTextField();
        jLabel23 = new javax.swing.JLabel();
        jLabel24 = new javax.swing.JLabel();
        jPanel9 = new javax.swing.JPanel();
        tf1KindStufe0 = new javax.swing.JTextField();
        tf2KindStufe0 = new javax.swing.JTextField();
        jLabel22 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        tf3KindStufe0 = new javax.swing.JTextField();
        tf4KindStufe0 = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jPanel11 = new javax.swing.JPanel();
        tf5KindStufe0 = new javax.swing.JTextField();
        tfMehrAls5 = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        tfGrenzMinStufe1 = new javax.swing.JTextField();
        tfGrenzMaxStufe1 = new javax.swing.JTextField();
        jPanel13 = new javax.swing.JPanel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        tfProzentsatzStufe1 = new javax.swing.JTextField();
        tfohneAVAEABStufe1 = new javax.swing.JTextField();
        jPanel14 = new javax.swing.JPanel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        tf1KindStufe1 = new javax.swing.JTextField();
        tf2KindStufe1 = new javax.swing.JTextField();
        jPanel15 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        tf3KindStufe1 = new javax.swing.JTextField();
        tf4KindStufe1 = new javax.swing.JTextField();
        jPanel16 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        tf5KindStufe1 = new javax.swing.JTextField();
        lbAendern1 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        tfGrenzMinStufe2 = new javax.swing.JTextField();
        tfGrenzMaxStufe2 = new javax.swing.JTextField();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        tfProzentsatzStufe2 = new javax.swing.JTextField();
        tfohneAVAEABStufe2 = new javax.swing.JTextField();
        tfProzentsatzStufe3 = new javax.swing.JTextField();
        tfohneAVAEABStufe3 = new javax.swing.JTextField();
        jPanel19 = new javax.swing.JPanel();
        tf1KindStufe2 = new javax.swing.JTextField();
        tf2KindStufe2 = new javax.swing.JTextField();
        tf1KindStufe3 = new javax.swing.JTextField();
        tf2KindStufe3 = new javax.swing.JTextField();
        jPanel20 = new javax.swing.JPanel();
        tf3KindStufe2 = new javax.swing.JTextField();
        tf4KindStufe2 = new javax.swing.JTextField();
        tf3KindStufe3 = new javax.swing.JTextField();
        tf4KindStufe3 = new javax.swing.JTextField();
        jPanel21 = new javax.swing.JPanel();
        tf5KindStufe2 = new javax.swing.JTextField();
        lbAendern2 = new javax.swing.JLabel();
        tf5KindStufe3 = new javax.swing.JTextField();
        lbAendern3 = new javax.swing.JLabel();
        jPanel24 = new javax.swing.JPanel();
        btFertig = new javax.swing.JButton();
        btAbbrechen = new javax.swing.JButton();

        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                closeDialog(evt);
            }
        });

        JPAAANEL.setLayout(new java.awt.GridLayout(4, 5));

        jPanel1.setLayout(new java.awt.GridLayout(2, 1));

        jLabel1.setBackground(new java.awt.Color(255, 153, 0));
        jLabel1.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Monatslohn");
        jLabel1.setOpaque(true);
        jPanel1.add(jLabel1);

        jPanel3.setLayout(new java.awt.GridLayout(1, 2));

        jLabel2.setBackground(new java.awt.Color(255, 153, 0));
        jLabel2.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("von");
        jLabel2.setOpaque(true);
        jPanel3.add(jLabel2);

        jLabel3.setBackground(new java.awt.Color(255, 153, 0));
        jLabel3.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("bis");
        jLabel3.setOpaque(true);
        jPanel3.add(jLabel3);

        jPanel1.add(jPanel3);

        JPAAANEL.add(jPanel1);

        jPanel2.setLayout(new java.awt.GridLayout(1, 2));

        jPanel22.setBackground(new java.awt.Color(217, 186, 78));
        jPanel2.add(jPanel22);

        jLabel4.setBackground(new java.awt.Color(255, 153, 0));
        jLabel4.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel4.setText("ohne AVAB");
        jLabel4.setOpaque(true);
        jPanel2.add(jLabel4);

        JPAAANEL.add(jPanel2);

        jPanel4.setLayout(new java.awt.GridLayout(2, 2));

        jLabel5.setBackground(new java.awt.Color(247, 244, 199));
        jLabel5.setOpaque(true);
        jPanel4.add(jLabel5);

        jLabel6.setBackground(new java.awt.Color(247, 244, 199));
        jLabel6.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel6.setText("Allein");
        jLabel6.setOpaque(true);
        jPanel4.add(jLabel6);

        jLabel7.setBackground(new java.awt.Color(255, 204, 51));
        jLabel7.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel7.setText("1 Kind");
        jLabel7.setOpaque(true);
        jPanel4.add(jLabel7);

        jLabel8.setBackground(new java.awt.Color(255, 153, 0));
        jLabel8.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel8.setText("2 Kind");
        jLabel8.setOpaque(true);
        jPanel4.add(jLabel8);

        JPAAANEL.add(jPanel4);

        jPanel5.setLayout(new java.awt.GridLayout(2, 2));

        jLabel9.setBackground(new java.awt.Color(247, 244, 199));
        jLabel9.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel9.setText("verdiener");
        jLabel9.setOpaque(true);
        jPanel5.add(jLabel9);

        jLabel10.setBackground(new java.awt.Color(247, 244, 199));
        jLabel10.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel10.setText("oder");
        jLabel10.setOpaque(true);
        jPanel5.add(jLabel10);

        jLabel11.setBackground(new java.awt.Color(255, 204, 51));
        jLabel11.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel11.setText("3 Kinder");
        jLabel11.setOpaque(true);
        jPanel5.add(jLabel11);

        jLabel12.setBackground(new java.awt.Color(255, 153, 0));
        jLabel12.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel12.setText("4 Kinder");
        jLabel12.setOpaque(true);
        jPanel5.add(jLabel12);

        JPAAANEL.add(jPanel5);

        jPanel6.setLayout(new java.awt.GridLayout(2, 2));

        jLabel13.setBackground(new java.awt.Color(247, 244, 199));
        jLabel13.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel13.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel13.setText("Alleinerzieher");
        jLabel13.setOpaque(true);
        jPanel6.add(jLabel13);

        jLabel14.setBackground(new java.awt.Color(247, 244, 199));
        jLabel14.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel14.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel14.setOpaque(true);
        jPanel6.add(jLabel14);

        jLabel15.setBackground(new java.awt.Color(255, 204, 51));
        jLabel15.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel15.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel15.setText("5 Kinder");
        jLabel15.setOpaque(true);
        jPanel6.add(jLabel15);

        jLabel16.setBackground(new java.awt.Color(255, 153, 0));
        jLabel16.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel16.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel16.setText("mehr als 5");
        jLabel16.setOpaque(true);
        jPanel6.add(jLabel16);

        JPAAANEL.add(jPanel6);

        jPanel7.setLayout(new java.awt.GridLayout(2, 2));

        jLabel17.setBackground(new java.awt.Color(247, 244, 199));
        jLabel17.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel17.setText("keine od");
        jLabel17.setOpaque(true);
        jPanel7.add(jLabel17);

        jLabel18.setBackground(new java.awt.Color(247, 244, 199));
        jLabel18.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel18.setText("er oder Negati");
        jLabel18.setOpaque(true);
        jPanel7.add(jLabel18);

        jLabel19.setBackground(new java.awt.Color(255, 153, 0));
        jLabel19.setOpaque(true);
        jPanel7.add(jLabel19);

        jLabel20.setBackground(new java.awt.Color(255, 153, 0));
        jLabel20.setOpaque(true);
        jPanel7.add(jLabel20);

        JPAAANEL.add(jPanel7);

        jPanel8.setLayout(new java.awt.GridLayout(2, 2));

        jLabel21.setBackground(new java.awt.Color(247, 244, 199));
        jLabel21.setText("vsteuer bis");
        jLabel21.setOpaque(true);
        jPanel8.add(jLabel21);

        tfOhneAVAEABStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfOhneAVAEABStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfOhneAVAEABStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfOhneAVS0(evt);
            }
        });
        jPanel8.add(tfOhneAVAEABStufe0);

        jLabel23.setBackground(new java.awt.Color(217, 186, 78));
        jLabel23.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel23.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel23.setText("Grenz-");
        jLabel23.setToolTipText("");
        jLabel23.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel23.setOpaque(true);
        jPanel8.add(jLabel23);

        jLabel24.setBackground(new java.awt.Color(247, 244, 199));
        jLabel24.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel24.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel24.setText("Abzug");
        jLabel24.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel24.setOpaque(true);
        jPanel8.add(jLabel24);

        JPAAANEL.add(jPanel8);

        jPanel9.setLayout(new java.awt.GridLayout(2, 2));

        tf1KindStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf1KindStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf1KindStufe0.setText("1124,23");
        tf1KindStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhne1K(evt);
            }
        });
        jPanel9.add(tf1KindStufe0);

        tf2KindStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf2KindStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf2KindStufe0.setText("1164,18");
        tf2KindStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhne2K(evt);
            }
        });
        jPanel9.add(tf2KindStufe0);

        jLabel22.setBackground(new java.awt.Color(247, 244, 199));
        jLabel22.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel22.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel22.setText("mit");
        jLabel22.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel22.setOpaque(true);
        jPanel9.add(jLabel22);

        jLabel25.setBackground(new java.awt.Color(247, 244, 199));
        jLabel25.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel25.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel25.setText("AVAB");
        jLabel25.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel25.setOpaque(true);
        jPanel9.add(jLabel25);

        JPAAANEL.add(jPanel9);

        jPanel10.setLayout(new java.awt.GridLayout(2, 2));

        tf3KindStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf3KindStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf3KindStufe0.setText("1214,41");
        tf3KindStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhne3K(evt);
            }
        });
        jPanel10.add(tf3KindStufe0);

        tf4KindStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf4KindStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf4KindStufe0.setText("1264,64");
        tf4KindStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhne4K(evt);
            }
        });
        jPanel10.add(tf4KindStufe0);

        jLabel26.setBackground(new java.awt.Color(247, 244, 199));
        jLabel26.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel26.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel26.setText("oder");
        jLabel26.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel26.setOpaque(true);
        jPanel10.add(jLabel26);

        jLabel27.setBackground(new java.awt.Color(247, 244, 199));
        jLabel27.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel27.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel27.setText("mit");
        jLabel27.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel27.setOpaque(true);
        jPanel10.add(jLabel27);

        JPAAANEL.add(jPanel10);

        jPanel11.setLayout(new java.awt.GridLayout(2, 2));

        tf5KindStufe0.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf5KindStufe0.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf5KindStufe0.setText("1314,87");
        tf5KindStufe0.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhne5K(evt);
            }
        });
        jPanel11.add(tf5KindStufe0);

        tfMehrAls5.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfMehrAls5.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfMehrAls5.setText("18,33");
        tfMehrAls5.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onOhneMK(evt);
            }
        });
        jPanel11.add(tfMehrAls5);

        jLabel28.setBackground(new java.awt.Color(247, 244, 199));
        jLabel28.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel28.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel28.setText("AEAB");
        jLabel28.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jLabel28.setOpaque(true);
        jPanel11.add(jLabel28);

        jLabel29.setBackground(new java.awt.Color(247, 244, 199));
        jLabel29.setToolTipText("");
        jLabel29.setOpaque(true);
        jPanel11.add(jLabel29);

        JPAAANEL.add(jPanel11);

        jPanel12.setLayout(new java.awt.GridLayout(2, 2));

        jLabel30.setBackground(new java.awt.Color(255, 153, 0));
        jLabel30.setOpaque(true);
        jPanel12.add(jLabel30);

        jLabel31.setBackground(new java.awt.Color(255, 153, 0));
        jLabel31.setOpaque(true);
        jPanel12.add(jLabel31);

        tfGrenzMinStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfGrenzMinStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfGrenzMinStufe1.setText("1011,45");
        tfGrenzMinStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onMinS1(evt);
            }
        });
        jPanel12.add(tfGrenzMinStufe1);

        tfGrenzMaxStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfGrenzMaxStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfGrenzMaxStufe1.setText("2099,34");
        tfGrenzMaxStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onMaxS1(evt);
            }
        });
        jPanel12.add(tfGrenzMaxStufe1);

        JPAAANEL.add(jPanel12);

        jPanel13.setLayout(new java.awt.GridLayout(2, 2));

        jLabel32.setBackground(new java.awt.Color(217, 186, 78));
        jLabel32.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N
        jLabel32.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel32.setText("steuersatz");
        jLabel32.setVerticalAlignment(javax.swing.SwingConstants.TOP);
        jLabel32.setOpaque(true);
        jPanel13.add(jLabel32);

        jLabel33.setBackground(new java.awt.Color(247, 244, 199));
        jLabel33.setOpaque(true);
        jPanel13.add(jLabel33);

        tfProzentsatzStufe1.setBackground(new java.awt.Color(217, 186, 78));
        tfProzentsatzStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfProzentsatzStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfProzentsatzStufe1.setText("36,50%");
        tfProzentsatzStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfSteuerS1(evt);
            }
        });
        jPanel13.add(tfProzentsatzStufe1);

        tfohneAVAEABStufe1.setBackground(new java.awt.Color(255, 153, 0));
        tfohneAVAEABStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfohneAVAEABStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfohneAVAEABStufe1.setText("369,18");
        tfohneAVAEABStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfOhneAVS1(evt);
            }
        });
        jPanel13.add(tfohneAVAEABStufe1);

        JPAAANEL.add(jPanel13);

        jPanel14.setLayout(new java.awt.GridLayout(2, 2));

        jLabel34.setBackground(new java.awt.Color(247, 244, 199));
        jLabel34.setOpaque(true);
        jPanel14.add(jLabel34);

        jLabel35.setBackground(new java.awt.Color(247, 244, 199));
        jLabel35.setOpaque(true);
        jPanel14.add(jLabel35);

        tf1KindStufe1.setBackground(new java.awt.Color(255, 204, 51));
        tf1KindStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf1KindStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf1KindStufe1.setText("410,34");
        tf1KindStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV1KS1(evt);
            }
        });
        jPanel14.add(tf1KindStufe1);

        tf2KindStufe1.setBackground(new java.awt.Color(255, 153, 0));
        tf2KindStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf2KindStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf2KindStufe1.setText("424,93");
        tf2KindStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV2KS1(evt);
            }
        });
        jPanel14.add(tf2KindStufe1);

        JPAAANEL.add(jPanel14);

        jPanel15.setLayout(new java.awt.GridLayout(2, 2));

        jLabel36.setBackground(new java.awt.Color(247, 244, 199));
        jLabel36.setOpaque(true);
        jPanel15.add(jLabel36);

        jLabel37.setBackground(new java.awt.Color(247, 244, 199));
        jLabel37.setOpaque(true);
        jPanel15.add(jLabel37);

        tf3KindStufe1.setBackground(new java.awt.Color(255, 204, 51));
        tf3KindStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf3KindStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf3KindStufe1.setText("443,26");
        tf3KindStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV3KS1(evt);
            }
        });
        jPanel15.add(tf3KindStufe1);

        tf4KindStufe1.setBackground(new java.awt.Color(255, 153, 0));
        tf4KindStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf4KindStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf4KindStufe1.setText("461,59");
        tf4KindStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV4KS1(evt);
            }
        });
        jPanel15.add(tf4KindStufe1);

        JPAAANEL.add(jPanel15);

        jPanel16.setLayout(new java.awt.GridLayout(2, 2));

        jLabel38.setBackground(new java.awt.Color(247, 244, 199));
        jLabel38.setOpaque(true);
        jPanel16.add(jLabel38);

        jLabel39.setBackground(new java.awt.Color(247, 244, 199));
        jLabel39.setOpaque(true);
        jPanel16.add(jLabel39);

        tf5KindStufe1.setBackground(new java.awt.Color(255, 204, 51));
        tf5KindStufe1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf5KindStufe1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf5KindStufe1.setText("479,93");
        tf5KindStufe1.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tf5KindStufe1KeyReleased(evt);
            }
        });
        jPanel16.add(tf5KindStufe1);

        lbAendern1.setBackground(new java.awt.Color(255, 153, 0));
        lbAendern1.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        lbAendern1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbAendern1.setText("18,33");
        lbAendern1.setOpaque(true);
        jPanel16.add(lbAendern1);

        JPAAANEL.add(jPanel16);

        jPanel17.setLayout(new java.awt.GridLayout(2, 2));

        tfGrenzMinStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfGrenzMinStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfGrenzMinStufe2.setText("2099,35");
        tfGrenzMinStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onMinS2(evt);
            }
        });
        jPanel17.add(tfGrenzMinStufe2);

        tfGrenzMaxStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfGrenzMaxStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfGrenzMaxStufe2.setText("5016,00");
        tfGrenzMaxStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onMaxS2(evt);
            }
        });
        jPanel17.add(tfGrenzMaxStufe2);

        jLabel42.setBackground(new java.awt.Color(255, 153, 0));
        jLabel42.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
        jLabel42.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        jLabel42.setText("da");
        jLabel42.setOpaque(true);
        jPanel17.add(jLabel42);

        jLabel43.setBackground(new java.awt.Color(255, 153, 0));
        jLabel43.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
        jLabel43.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        jLabel43.setText("rüber");
        jLabel43.setOpaque(true);
        jPanel17.add(jLabel43);

        JPAAANEL.add(jPanel17);

        jPanel18.setLayout(new java.awt.GridLayout(2, 2));

        tfProzentsatzStufe2.setBackground(new java.awt.Color(217, 186, 78));
        tfProzentsatzStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfProzentsatzStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfProzentsatzStufe2.setText("42,21429%");
        tfProzentsatzStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onSteuerS2(evt);
            }
        });
        jPanel18.add(tfProzentsatzStufe2);

        tfohneAVAEABStufe2.setBackground(new java.awt.Color(255, 153, 0));
        tfohneAVAEABStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfohneAVAEABStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfohneAVAEABStufe2.setText("510,13");
        tfohneAVAEABStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfOhneAVS2(evt);
            }
        });
        jPanel18.add(tfohneAVAEABStufe2);

        tfProzentsatzStufe3.setBackground(new java.awt.Color(217, 186, 78));
        tfProzentsatzStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfProzentsatzStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfProzentsatzStufe3.setText("50,00%");
        tfProzentsatzStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onSteuerS3(evt);
            }
        });
        jPanel18.add(tfProzentsatzStufe3);

        tfohneAVAEABStufe3.setBackground(new java.awt.Color(255, 153, 0));
        tfohneAVAEABStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tfohneAVAEABStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tfohneAVAEABStufe3.setText("850,50");
        tfohneAVAEABStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                tfOhneAVS3(evt);
            }
        });
        jPanel18.add(tfohneAVAEABStufe3);

        JPAAANEL.add(jPanel18);

        jPanel19.setLayout(new java.awt.GridLayout(2, 2));

        tf1KindStufe2.setBackground(new java.awt.Color(255, 204, 51));
        tf1KindStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf1KindStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf1KindStufe2.setText("551,30");
        tf1KindStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV1KS2(evt);
            }
        });
        jPanel19.add(tf1KindStufe2);

        tf2KindStufe2.setBackground(new java.awt.Color(255, 153, 0));
        tf2KindStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf2KindStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf2KindStufe2.setText("565,88");
        tf2KindStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV2KS2(evt);
            }
        });
        jPanel19.add(tf2KindStufe2);

        tf1KindStufe3.setBackground(new java.awt.Color(255, 204, 51));
        tf1KindStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf1KindStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf1KindStufe3.setText("891,67");
        tf1KindStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV1KS3(evt);
            }
        });
        jPanel19.add(tf1KindStufe3);

        tf2KindStufe3.setBackground(new java.awt.Color(255, 153, 0));
        tf2KindStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf2KindStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf2KindStufe3.setText("906,25");
        tf2KindStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV2KS3(evt);
            }
        });
        jPanel19.add(tf2KindStufe3);

        JPAAANEL.add(jPanel19);

        jPanel20.setLayout(new java.awt.GridLayout(2, 2));

        tf3KindStufe2.setBackground(new java.awt.Color(255, 204, 51));
        tf3KindStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf3KindStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf3KindStufe2.setText("584,22");
        tf3KindStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV3KS2(evt);
            }
        });
        jPanel20.add(tf3KindStufe2);

        tf4KindStufe2.setBackground(new java.awt.Color(255, 153, 0));
        tf4KindStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf4KindStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf4KindStufe2.setText("602,55");
        tf4KindStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV4KS2(evt);
            }
        });
        jPanel20.add(tf4KindStufe2);

        tf3KindStufe3.setBackground(new java.awt.Color(255, 204, 51));
        tf3KindStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf3KindStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf3KindStufe3.setText("924,59");
        tf3KindStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV3KS3(evt);
            }
        });
        jPanel20.add(tf3KindStufe3);

        tf4KindStufe3.setBackground(new java.awt.Color(255, 153, 0));
        tf4KindStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf4KindStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf4KindStufe3.setText("942,59");
        tf4KindStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV4KS3(evt);
            }
        });
        jPanel20.add(tf4KindStufe3);

        JPAAANEL.add(jPanel20);

        jPanel21.setLayout(new java.awt.GridLayout(2, 2));

        tf5KindStufe2.setBackground(new java.awt.Color(255, 204, 51));
        tf5KindStufe2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf5KindStufe2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf5KindStufe2.setText("620,88");
        tf5KindStufe2.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV5KS2(evt);
            }
        });
        jPanel21.add(tf5KindStufe2);

        lbAendern2.setBackground(new java.awt.Color(255, 153, 0));
        lbAendern2.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        lbAendern2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbAendern2.setText("18,33");
        lbAendern2.setOpaque(true);
        jPanel21.add(lbAendern2);

        tf5KindStufe3.setBackground(new java.awt.Color(255, 204, 51));
        tf5KindStufe3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        tf5KindStufe3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        tf5KindStufe3.setText("961,25");
        tf5KindStufe3.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                onAV5KS3(evt);
            }
        });
        jPanel21.add(tf5KindStufe3);

        lbAendern3.setBackground(new java.awt.Color(255, 153, 0));
        lbAendern3.setFont(new java.awt.Font("NSimSun", 0, 14)); // NOI18N
        lbAendern3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lbAendern3.setText("18,33");
        lbAendern3.setOpaque(true);
        jPanel21.add(lbAendern3);

        JPAAANEL.add(jPanel21);

        add(JPAAANEL, java.awt.BorderLayout.CENTER);

        jPanel24.setLayout(new java.awt.GridLayout(1, 2));

        btFertig.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
        btFertig.setText("Übernehmen");
        btFertig.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                onOK(evt);
            }
        });
        jPanel24.add(btFertig);

        btAbbrechen.setFont(new java.awt.Font("Verdana", 1, 18)); // NOI18N
        btAbbrechen.setText("Abbrechen");
        btAbbrechen.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                onAbbrehe(evt);
            }
        });
        jPanel24.add(btAbbrechen);

        add(jPanel24, java.awt.BorderLayout.SOUTH);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    /**
     * Closes the dialog
     */
    private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog
        setVisible(false);
        dispose();
    }//GEN-LAST:event_closeDialog

    private void onOK(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onOK
        try {
            dba.schreibeAEAV(list);
        }catch(Exception ex){
            ex.printStackTrace();
        }
        this.dispose();
    }//GEN-LAST:event_onOK

    private void onAbbrehe(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onAbbrehe
        this.dispose();
    }//GEN-LAST:event_onAbbrehe

    private void tfOhneAVS0(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfOhneAVS0
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVohneKind(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tfOhneAVS0

    private void tfOhneAVS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfOhneAVS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVohneKind(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tfOhneAVS1

    private void tfOhneAVS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfOhneAVS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVohneKind(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tfOhneAVS2

    private void tfOhneAVS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfOhneAVS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVohneKind(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tfOhneAVS3

    private void tfSteuerS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tfSteuerS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).getAeavsteuer().setSteuersatz(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tfSteuerS1

    private void onSteuerS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onSteuerS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).getAeavsteuer().setSteuersatz(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onSteuerS2

    private void onSteuerS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onSteuerS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).getAeavsteuer().setSteuersatz(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onSteuerS3

    private void onMinS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onMinS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).getAeavsteuer().setSteuerUntergrenze(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onMinS1

    private void onMaxS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onMaxS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).getAeavsteuer().setSteuerObergrenze(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onMaxS1

    private void onMinS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onMinS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).getAeavsteuer().setSteuerUntergrenze(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onMinS2

    private void onMaxS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onMaxS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).getAeavsteuer().setSteuerObergrenze(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onMaxS2

    private void onOhne1K(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhne1K
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVkind1(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhne1K

    private void onOhne2K(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhne2K
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVkind2(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhne2K

    private void onOhne3K(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhne3K
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVkind3(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhne3K

    private void onOhne4K(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhne4K
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVkind4(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhne4K

    private void onOhne5K(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhne5K
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVkind5(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhne5K

    private void onOhneMK(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onOhneMK
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(0).setAEAVabstufung(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onOhneMK

    private void onAV1KS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV1KS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVkind1(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV1KS1

    private void onAV1KS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV1KS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVkind1(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV1KS2

    private void onAV1KS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV1KS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVkind1(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV1KS3

    private void onAV2KS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV2KS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVkind2(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV2KS1

    private void onAV2KS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV2KS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVkind2(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV2KS2

    private void onAV2KS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV2KS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVkind2(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV2KS3

    private void onAV3KS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV3KS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVkind3(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV3KS1

    private void onAV3KS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV3KS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVkind3(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV3KS2

    private void onAV3KS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV3KS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVkind3(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV3KS3

    private void onAV4KS1(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV4KS1
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVkind4(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV4KS1

    private void onAV4KS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV4KS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVkind4(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV4KS2

    private void onAV4KS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV4KS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVkind4(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV4KS3

    private void tf5KindStufe1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_tf5KindStufe1KeyReleased
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(1).setAEAVkind5(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_tf5KindStufe1KeyReleased

    private void onAV5KS2(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV5KS2
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(2).setAEAVkind5(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV5KS2

    private void onAV5KS3(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_onAV5KS3
        JTextField tf = (JTextField) evt.getSource();
        if(!tf.getText().isEmpty()){
           try{
            float wert = Float.parseFloat(tf.getText().replace(',', '.'));
            list.get(3).setAEAVkind5(wert);
           }catch(java.lang.ClassCastException ex){
               JOptionPane.showMessageDialog(this, "ist keine Zahl!!");
           }
        }
    }//GEN-LAST:event_onAV5KS3

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                TarifTabelle dialog = new TarifTabelle(new java.awt.Frame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JPanel JPAAANEL;
    private javax.swing.JButton btAbbrechen;
    private javax.swing.JButton btFertig;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JLabel lbAendern1;
    private javax.swing.JLabel lbAendern2;
    private javax.swing.JLabel lbAendern3;
    private javax.swing.JTextField tf1KindStufe0;
    private javax.swing.JTextField tf1KindStufe1;
    private javax.swing.JTextField tf1KindStufe2;
    private javax.swing.JTextField tf1KindStufe3;
    private javax.swing.JTextField tf2KindStufe0;
    private javax.swing.JTextField tf2KindStufe1;
    private javax.swing.JTextField tf2KindStufe2;
    private javax.swing.JTextField tf2KindStufe3;
    private javax.swing.JTextField tf3KindStufe0;
    private javax.swing.JTextField tf3KindStufe1;
    private javax.swing.JTextField tf3KindStufe2;
    private javax.swing.JTextField tf3KindStufe3;
    private javax.swing.JTextField tf4KindStufe0;
    private javax.swing.JTextField tf4KindStufe1;
    private javax.swing.JTextField tf4KindStufe2;
    private javax.swing.JTextField tf4KindStufe3;
    private javax.swing.JTextField tf5KindStufe0;
    private javax.swing.JTextField tf5KindStufe1;
    private javax.swing.JTextField tf5KindStufe2;
    private javax.swing.JTextField tf5KindStufe3;
    private javax.swing.JTextField tfGrenzMaxStufe1;
    private javax.swing.JTextField tfGrenzMaxStufe2;
    private javax.swing.JTextField tfGrenzMinStufe1;
    private javax.swing.JTextField tfGrenzMinStufe2;
    private javax.swing.JTextField tfMehrAls5;
    private javax.swing.JTextField tfOhneAVAEABStufe0;
    private javax.swing.JTextField tfProzentsatzStufe1;
    private javax.swing.JTextField tfProzentsatzStufe2;
    private javax.swing.JTextField tfProzentsatzStufe3;
    private javax.swing.JTextField tfohneAVAEABStufe1;
    private javax.swing.JTextField tfohneAVAEABStufe2;
    private javax.swing.JTextField tfohneAVAEABStufe3;
    // End of variables declaration//GEN-END:variables
}
